// JointRegular.h: interface for the JointRegular class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JOINTREGULAR_H__486D8BF8_9BEB_42A8_A41D_2E347DC9C559__INCLUDED_)
#define AFX_JOINTREGULAR_H__486D8BF8_9BEB_42A8_A41D_2E347DC9C559__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Joint;
class JointState;
#include "RegisterObject.h"
#include "SpecialJointRegularInfo.h"
#include "JointPortFormer.h"

class AFX_EXT_CLASS JointRegular : public RegisterObject<JointRegular, SpecialJointRegularInfo>
{
	DECLARE_DYNAMIC_EX(JointRegular)
public:
	JointRegular();
	virtual ~JointRegular();

public:
	void SetJoint(Joint* pJoint){
		ASSERT(pJoint);
		m_pJoint = pJoint;
	}

	virtual BOOL Execute() = 0;
protected:
	Joint* GetJoint(){
		return m_pJoint;
	}

	JointState* GetJointState(){
		return m_pState;
	}

	void SetJointState(JointState* pState){
		m_pState = pState;
	}

	void GenerateJointState(JointState& FirstFixNextUnfixState, JointState& AllFixState);

public:
	static DWORD RegularSerialNumGenerator(INT nFirstJointNum, INT nAfterJointNum);
	static CStringArray* GetSizeRangeText(JointSystem::RealTextExpSet& text);
private:
	Joint* m_pJoint;
	JointState* m_pState;

};

#endif // !defined(AFX_JOINTREGULAR_H__486D8BF8_9BEB_42A8_A41D_2E347DC9C559__INCLUDED_)
